<%--
  Created by IntelliJ IDEA.
  User: 唐东
  Date: 2021/1/20
  Time: 15:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
    <title>在线购物</title>
    <style>
        .border_distance tr td{
            border:1px solid #CD6889;
        }
    </style>
</head>
<body  bgcolor="pink">
<h2 align="center">在线购物</h2>
<hr>
<table class="border_distance" width="650" align="center"  bgcolor="white">
    <thead>
    <tr bgcolor="#DB7093">
        <td align="center" width="80">商品缩图</td>
        <td align="center">商品摘要</td>
        <td align="center" width="100">在线购买</td>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${requestScope.lists}" var="book">
        <tr>
            <td>
                <img style="width: 30px;height: 50px" src="/images/${book.image}">
            </td>
            <td style="width: 130px">书名：${book.bookName}<br/>
                作者：${book.author}<br/>
                出版社：${book.press}<br/>
                价格：${book.price}<br/>
                图书数量：${book.num}
            </td>
            <td>
                <a href="/insertCartServlet?bookId=${book.id}">放入购物车</a>
            </td>
        </tr>
    </c:forEach>
    <tr align="center">
        <td colspan="5">
            <a href="/listCartServlet">查看购物车</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>
